import Vue from 'vue'
import App from './App.vue'
import Router from 'vue-router'
import router from './config/router'
import ElementUI from 'element-ui';
import method from '@/config/api'
import request from '@/config/index'
import VueI18n from 'vue-i18n'

import 'element-ui/lib/theme-chalk/index.css';
import './style.css'

import '@/config/lib-flexible'

Vue.use(VueI18n);
Vue.use(Router)
Vue.use(ElementUI);

Vue.config.productionTip = false
Vue.prototype.$method = method
Vue.prototype.$postRequest = request.post
Vue.prototype.$getRequest = request.get
Vue.prototype.$imgurl = request.baseURL

let Chinese = require('@/locales/zh-CN.js')
let English = require('@/locales/en-US.js')
const i18n = new VueI18n({
	locale: 'zh-CN', // 默认语言
	messages: { // 引入语言文件
		'zh-CN': Chinese,
		'en-US': English
	}
})
Vue.prototype._i18n = i18n

document.title = '河南泥筑新材料有限公司'

router.afterEach((to, from, next) => {
  window.scrollTo(0, 0)
})

new Vue({
  router,
  render: h => h(App),
}).$mount('#app')
